/*
 _                                             _    
| |                                           | |   
| |__   ___  _ __ ___   _____      _____  _ __| | __
| '_ \ / _ \| '_ ` _ \ / _ \ \ /\ / / _ \| '__| |/ /
| | | | (_) | | | | | |  __/\ V  V / (_) | |  |   < 
|_| |_|\___/|_| |_| |_|\___| \_/\_/ \___/|_|  |_|\_\

                  Version 0.1 Alpha
               GameMaker Math Library
*/
#define hw_Version
// Returns the version of Homework.
// hw_Version();
return "0.1";

#define hw_CircByRadius
// Finds the circumference of circle from radius
// hw_CircByRadius(radius);
return pi*(argument0*2);

#define hw_CircByDiameter
// Finds the circumference of a circle from the diameter
// hw_CircByDiameter(diameter);
return pi*argument0;

#define hw_IsPrime
// Finds weither or not the given number is prime.
// Returns true if given number is true, otherwise returns false.
// hw_IsPrime(number);
for (i=2; i<number; i++)
{
	if (number == 0)
	{
		return false;
		break;
	}
	
	//This may get me into trouble... :-b
	if (number == 1)
	{
		return false;
		break;
	}
	
	if (number % i == 0)
	{
		return false;
		break;
	}
	
	else
	{
		return true;
	}
}

#define hw_IsPrimeFactor
// Finds weither or not the given number is prime.
// Returns true if given number is true, otherwise returns the lowest factor.
// hw_IsPrimeFactor(number);
for (i=2; i<number; i++)
{
	if (number == 0)
	{
		return 0;
		break;
	}
	
	//And again...
	if (number == 1)
	{
		return 1;
		break;
	}
	
	if (number % i == 0)
	{
		return i;
		break;
	}
	
	else
	{
		return true;
	}
}